import request from '@/utils/request'

// 账号密码登录
export function passwordLogin(data) {
  return request({
    url: '/equipment/member/passwordLogin',
    method: 'post',
    data
  })
}


// 验证码登录
export function codeLogin(data) {
  return request({
    url: '/equipment/member/codeLogin',
    method: 'post',
    data
  })
}

// 忘记密码
export function forgetPassword(data) {
  return request({
    url: '/equipment/member/forgetPassword',
    method: 'post',
    data
  })
}

// 注册
export function register(data) {
  return request({
    url: '/equipment/member/register',
    method: 'post',
    data
  })
}

// 获取用户信息
export function getUserInfo(query) {
  return request({
    url: '/equipment/member/memberInfo',
    method: 'get',
    query
  })
}

// 成为企业账号
export function becomeFirm(data) {
  return request({
    url: '/equipment/member/becomeFirm',
    method: 'post',
    data
  })
}


// 查询店铺信息
export function getFirmInfo(query) {
  return request({
    url: '/equipment/firm/firmInfo',
    method: 'get',
    query
  })
}


// 编辑店铺信息
export function editFirm(data) {
  return request({
    url: '/equipment/firm/editFirm',
    method: 'post',
    data
  })
}

// 实名认证
export function applyRealName(data) {
  return request({
    url: '/equipment/real/applyReal',
    method: 'post',
    data
  })
}
